#coding:utf8
'''
  google appengine album
  author: smallfish <smallfish.xy@gmail.com>
  create: 2009-08-04

'''
import os
import wsgiref.handlers
import logging

import web
from mako.template import Template
from mako.lookup import TemplateLookup

import google.appengine.ext import db
import google.appengine.api import users

BASE_DIR = os.path.dirname(__file__)
TEMP_DIR = BASE_DIR + '/templates'

MAKO_LOOKUP = TemplateLookup(directories = [TEMP_DIR])

def render(template_name, **kargs):
    template = MAKO_LOOKUP.get_template(template_name)
    return template.render(**kargs)

class AlbumType(db.Model):
    name = db.StringProperty()
    size = db.IntegerProperty()
    date = db.DateTimeProperty(auto_now_add=True)
